import request from '@/utils/request'

// 查询VIP列表
export function getVipList(params) {
  return request({
    url: '/product/recharge/list',
    method: 'get',
    params
  })
}

// VIP充值
export function rechargeVip(data) {
  return request({
    url: '/order/openOrder/toRecharge',
    method: 'post',
    data
  })
}

// 查询会员的积分列表
export function getIntegralList(params) {
  return request({
    url: '/customer/openCustomer/getAllScoreDetail',
    method: 'get',
    params
  })
}

// 查询会员的论文下载/买断列表
export function getPaperOrderList(params) {
    return request({
        url: '/order/openOrder/mine',
        method: 'get',
        params
    })
}

// 查询会员权益列表
export function getVipRightList(params) {
    return request({
        url: '/customer/openCustomer/levelAndPrivilege',
        method: 'get',
        params
    })
}

// 查询会员抵扣列表
export function getVipDiscountList(params) {
    return request({
        url: '/customer/openCustomer/getDeductList',
        method: 'get',
        params
    })
}

// 会员确认抵扣资料
export function confirmVipDiscount(detailUid) {
    return request({
        url: `/customer/openCustomer/deduct/${detailUid}`,
        method: 'post',
    })
}